/*
 * @Author: Islands 1430536748@qq.com
 * @Date: 2024-07-14 23:41:51
 * @LastEditors: 周洋 1430536748@qq.com
 * @LastEditTime: 2024-08-10 00:21:30
 * @version: 1.2.0
 * @Description: 
 */
import { FitEnum } from '@/enum/index';
import { PropType } from "vue";

const IAlign = ['center', 'direction','left'] as const;
type IAlignType = (typeof IAlign)[number];


/** logo 导入数据 */
const logoImage = "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg";
type ITitle = {
    chinese: String,
    english: String
}
type IWidthAndHeight = {
    width: String | Number,
    height: String | Number,
}
export const logoProps = {
    /** 图片如何适应容器框 */
    fit: {
        type: String as PropType<FitEnum>,
        default: FitEnum.COVER,
    },
    /** 图标地址 */
    src: {
        type: String,
        default: logoImage
    },
    /** logo中英标题 */
    title: {
        type: Object as PropType<ITitle>,
        default: {
            chinese: 'Sass管理平台',
            english: 'Sass Management Platform'
        }
    },
    /** logo 长/宽 */
    wh: {
        type: Object as PropType<IWidthAndHeight>,
        default: {
            width: '120px',
            height: '60px'
        }
    },
    /** 是否需要文字Logo */
    isTextLogo: {
        type: Boolean,
        default: true
    },
    /** 对齐方式 */
    align:{
        type: String as PropType<IAlignType>,
        validator: (v: any) => IAlign.includes(v),
        default: 'direction'
    }
}